Various electronic systems operate in the presence of magnetic fields. For example, some magnetic position tracking systems track the position of a catheters or other probe in a patient body by generating known magnetic fields and measuring the fields using a magnetic field sensor fitted in the probe. Systems of this sort are described, for example, in U.S. Pat. Nos. 5,391,199, 6,690,963, 6,484,118, 6,239,724, 6,618,612 and 6,332,089, in PCT International Publication WO 96/05768, and in U.S. Patent Application Publications 2002/0065455, 2003/0120150 and 2004/0068178, whose disclosures are all incorporated herein by reference.